namespace KPIS.GERP.Models.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class update0007 : DbMigration
    {
        public override void Up()
        {
            RenameTable(name: "dbo.HrmPsEmployeeStatus", newName: "hrm_ps_employee_statuses");
            RenameColumn(table: "dbo.hrm_ps_employee_statuses", name: "EmpStatusId", newName: "emp_status_seq");
            RenameColumn(table: "dbo.hrm_ps_employee_statuses", name: "EmpStatusName", newName: "emp_status_name");
            RenameColumn(table: "dbo.hrm_ps_employee_statuses", name: "EmpStatusCode", newName: "emp_status_code");
            RenameColumn(table: "dbo.hrm_ps_employee_statuses", name: "RecordStatus", newName: "record_status");
            RenameColumn(table: "dbo.hrm_ps_employee_statuses", name: "CreatedBy", newName: "created_by");
            RenameColumn(table: "dbo.hrm_ps_employee_statuses", name: "CreatedWhen", newName: "created_when");
            RenameColumn(table: "dbo.hrm_ps_employee_statuses", name: "UpdatedBy", newName: "updated_by");
            RenameColumn(table: "dbo.hrm_ps_employee_statuses", name: "UpdatedWhen", newName: "updated_when");
            AlterColumn("dbo.hrm_ps_employee_statuses", "active", c => c.String());
        }
        
        public override void Down()
        {
            AlterColumn("dbo.hrm_ps_employee_statuses", "Active", c => c.String());
            RenameColumn(table: "dbo.hrm_ps_employee_statuses", name: "updated_when", newName: "UpdatedWhen");
            RenameColumn(table: "dbo.hrm_ps_employee_statuses", name: "updated_by", newName: "UpdatedBy");
            RenameColumn(table: "dbo.hrm_ps_employee_statuses", name: "created_when", newName: "CreatedWhen");
            RenameColumn(table: "dbo.hrm_ps_employee_statuses", name: "created_by", newName: "CreatedBy");
            RenameColumn(table: "dbo.hrm_ps_employee_statuses", name: "record_status", newName: "RecordStatus");
            RenameColumn(table: "dbo.hrm_ps_employee_statuses", name: "emp_status_code", newName: "EmpStatusCode");
            RenameColumn(table: "dbo.hrm_ps_employee_statuses", name: "emp_status_name", newName: "EmpStatusName");
            RenameColumn(table: "dbo.hrm_ps_employee_statuses", name: "emp_status_seq", newName: "EmpStatusId");
            RenameTable(name: "dbo.hrm_ps_employee_statuses", newName: "HrmPsEmployeeStatus");
        }
    }
}
